Skip to content

Add AttachmentOptions::setMaxInlineBlobSize() and setMaxBlobCacheSize() - #76

Open
fdcastel wants to merge 1 commit into
asfernandes:mainfrom
fdcastel:attachment-inline-blobs
Open

fdcastel wants to merge 1 commit into
asfernandes:mainfrom
fdcastel:attachment-inline-blobs

Conversation

@fdcastel

Copy link
Copy Markdown
Contributor

Addresses item 2 of #74 (feedback).

Adds attachment options for the inline blob transfer introduced in Firebird 5.0.3. With inline blobs, small blobs come back with the rows of a result set instead of needing a round trip per blob, which matters a lot over remote connections.

Changes

  • AttachmentOptions::setMaxInlineBlobSize(std::uint32_t) / getMaxInlineBlobSize(): sets isc_dpb_max_inline_blob_size.
  • AttachmentOptions::setMaxBlobCacheSize(std::uint32_t) / getMaxBlobCacheSize(): sets isc_dpb_max_blob_cache_size.

Both work like the other optional DPB items in Attachment's constructor. Older Firebird versions ignore them.

Tests

AttachmentSuite/inlineBlobOptions attaches with both options set and checks the values through IAttachment::getMaxInlineBlobSize() and getMaxBlobCacheSize().

Full suite: 349 test cases pass (Windows, MSVC, Firebird 5.0.3 server).

Sets isc_dpb_max_inline_blob_size and isc_dpb_max_blob_cache_size (Firebird 5.0.3+).

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant